<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="zh-cn">
    <meta charset="UTF-8"/>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="description" content="厚和尚品"/>
    <meta name="keywords" content="厚和尚品"/>
    <title>厚和尚品</title>
    <link rel="apple-touch-icon-precomposed" href=""/>
    <link rel="apple-touch-startup-image" href=""/>
    <link rel="stylesheet" href="mall/css/css.css" th:href="@{/mall/css/css.css}" />
    <link rel="stylesheet" href="mall/lib/layer/layer_mobile/need/layer.css"
	th:href="@{/mall/lib/layer/layer_mobile/need/layer.css}" />
    <script type="text/javascript" src="mall/lib/zpeto/zepto-1.2.0.min.js"
	th:src="@{/mall/lib/zpeto/zepto-1.2.0.min.js}"></script>
    <script type="text/javascript" src="mall/js/comm.js"
	th:src="@{/mall/js/comm.js}"></script>
	<script type="text/javascript" src="mall/js/cart.js"
	th:src="@{/mall/js/cart.js}"></script>
	<script type="text/javascript"
	src="mall/lib/layer/layer_mobile/layer.js"
	th:src="@{/mall/lib/layer/layer_mobile/layer.js}"></script>
</head>
<body>
<div class="cart-item">
    <div class="o-title-shop">
        <div class="checkbox shop-yq-shop">
        </div>
        <div class="name"><img th:src="@{/mall/img/ico-house-01.png}" alt=""/>厚和尚品</div>
        <div class="edit">编辑</div>
    </div>
    <div class="o-item" th:if="${session.member_cart == null}" th:text="购物车暂无商品">
    	
    </div>
    <div class="o-item" th:if="${session.member_cart != null}" th:each="cartInfo : ${session.member_cart}">
        <div class="checkbox g_yq" th:attr="data-proid=${cartInfo.value.productId},data-price=${cartInfo.value.transAmt},data-buy-num=${cartInfo.value.count},data-point=${cartInfo.value.transBonus}">
        </div>
        <div class="goods-img">
            <img th:src="@{'/upload-dir/'+${cartInfo.value.productId}+'/min/' + ${cartInfo.value.smallImgPath}}" alt=""/>
        </div>
        <div class="content">
            <p class="title" th:text="${cartInfo.value.proName}">老风农天然450g喝出健康</p>
            <div class="item-pay">
                <div class="price"><span class="ftx-01" th:text="${cartInfo.value.transBonus}">200</span>积分+￥<span
						class="ftx-01" th:text="${cartInfo.value.transAmt}">59</span></div>
                <div class="quantity" th:text="|× ${cartInfo.value.count}|">×1</div>
            </div>
        </div>
        <div class="item-del" th:attr="data-proid=${cartInfo.value.productId}"><p>删除</p></div>
    </div>
    
</div>

<div class="bottom-fxied" style="left: 0px; bottom: 0px; width: 100%; display: block;">
    <div class="cart-ft mui-flex align-center">
    	<form id="cartform" method="post" th:action="@{/member/prepay/2}">
    		<input type="hidden" id="totalcount" name="itemCount"/>
    		<input type="hidden" id="totalamt" name="itemAmt"/>
    	</form>
        <div class="cell fixed mui-flex align-center">
            <div class="checkbox" id="shop_yq_all"></div>全选
            
        </div>
        <div class="cell text-right">
            <p class="ftx-01" id="total_price">合计：<span>&yen;0.00</span></p>
            <p>不含运费</p>
        </div>
        <div class="cell submit-btn-wrap fixed">
            <div class="submit-btn" id="cart_pay_btn" ontouchend="checkout();">
                结算(<span id="itemcount">0</span>)
            </div>
        </div>
        <script type="text/javascript">
			function checkout(){
				var itemcount = $("#itemcount").text();
				if(itemcount ==0){
					layer.open({
						content : '请选择至少一样商品结算！',
						skin : 'msg',
						time : 2
					//2秒后自动关闭
					});
				}else{
					$('#cartform').submit();
				}
				
			}
		</script>
    </div>
</div>
</body>
</html>